#    Shotscreens
#    Copyright (C) 2009, Kirill Yakovenko (http://crystalnix.com)

#    This program is free software: you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation, either version 3 of the License, or
#    (at your option) any later version.

#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.

#    You should have received a copy of the GNU General Public License
#    along with this program.  If not, see <http://www.gnu.org/licenses/>.

__author__="Yakovenko Kirill, Dmitriy Lyfar"
__status__ = "Beta version"
__date__ ="$08.05.2009$"

from bin.authorization import *
from bin.services_list import Services
from bin.win_environment import CingleInstance

if __name__ == "__main__":
    app = wx.PySimpleApp(0)
    mutex = CingleInstance()
    if len(Services):
        if not mutex.isAleradyRunning():
            mainWnd = AuthorizationWindow(None, -1, "Autorization")
            mainWnd.Show(True)
            app.MainLoop()
        else:
            wx.MessageBox("This program can run at time.", "Warning", wx.OK | wx.ICON_INFORMATION)
    else:
        wx.MessageBox("Services list is empty", "Warning", wx.OK | wx.ICON_INFORMATION)
